﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "ISafetyDevice" here, you must also update the reference to "ISafetyDevice" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ISafetyDevice
    {
        [OperationContract]
        DataSet SafetyDevice_GetAll();

        [OperationContract]
        SafetyDeviceInfo SafetyDevice_GetInfo(int SafetyDeviceID);

        [OperationContract]
        DataSet SafetyDevice_GetList(out int ItemCount, int BranchID, int DepartmentID, string keyword, string Type, string orderBy, string orderDirection, int currentPage, int pageSize);

        [OperationContract]
        DataSet SafetyDevice_GetWithEmployee(int EmployeeID);

        [OperationContract]
        int SafetyDevice_Insert(SafetyDeviceInfo eInfo);

        [OperationContract]
        bool SafetyDevice_Update(SafetyDeviceInfo eInfo);

        [OperationContract]
        bool SafetyDevice_UpdateEmployee(int EmployeeID);

        [OperationContract]
        bool SafetyDevice_Delete(int SafetyDeviceID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class SafetyDeviceInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }
        int _DepartmentID;
        [DataMember]
        public int DepartmentID
        {
            get { return _DepartmentID; }
            set { _DepartmentID = value; }
        }
        int _BranchID;
        [DataMember]
        public int BranchID
        {
            get { return _BranchID; }
            set { _BranchID = value; }
        }

        DateTime _Date;
        [DataMember]
        public DateTime Date
        {
            get { return _Date; }
            set { _Date = value; }
        }

        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        string _Type;
        [DataMember]
        public string Type
        {
            get { return _Type; }
            set { _Type = value; }
        }

        int _No;
        [DataMember]
        public int No
        {
            get { return _No; }
            set { _No = value; }
        }
    
        string _Status;
        [DataMember]
        public string Status
        {
            get { return _Status; }
            set { _Status = value; }
        }
    }
}

